import 'element-ui/lib/theme-chalk/index.css';
import './function'
import './mixin'
import CxsTable from "../packages/table";
import CxsForm from "../packages/form";
import CxsSelect from "../packages/select";
import {Button, Input, Table, TableColumn, Select, Option, DatePicker, Avatar, Tag, Divider} from 'element-ui'

const install = Vue => {
    Vue.use(Button);
    Vue.use(Input);
    Vue.use(Table);
    Vue.use(TableColumn);
    Vue.use(Select);
    Vue.use(Option);
    Vue.use(DatePicker);
    Vue.use(Avatar);
    Vue.use(Tag);
    Vue.use(Divider);
    Vue.component("CxsTable", CxsTable);
    Vue.component("CxsForm", CxsForm);
    Vue.component("CxsSelect", CxsSelect);
}

// 防止使用者直接以<script></script>方式引入
if (typeof window.Vue !== 'undefined') {
    install(Vue) // 直接通过script方式引入组件
}
export default {
    install
}